package com.spring.ext;

import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Service;

/**
 * Description:
 *
 * @author lijie
 * @create 2019-01-20 15:58
 * Update by lijie 2019-01-20 15:58
 */
@Service
public class UserService {

    @EventListener(classes = {ApplicationEvent.class})
    public void listen(ApplicationEvent event){
        System.out.println("userService...监听到的事件" + event);
    }

}
